grammar SplunkToMysql;

prog: query;
query: indexTable (pipe 'table' fields)?;

indexTable: 'index' indexAlias '=' indexName;
indexName: IDENTIFIER;
indexAlias: IDENTIFIER;
pipe: '|';
fields: fieldName (',' fieldName)*;

fieldName: IDENTIFIER;

IDENTIFIER: [a-zA-Z_][a-zA-Z_0-9]*;
WS: [ \t\r\n]+ -> skip;
